package client;

import service.OrderService;
import service.OrderServiceImp;
import service.TimerInvocationHandler;

import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        OrderService target=new OrderServiceImp();
        //创建代理对象
        OrderService o = (OrderService)Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(),new TimerInvocationHandler(target));
            o.detail();
    }
}
